/**
 * Created by cc
 * Description:
 * User: CZH
 * Date: 2022-09-25
 * Time: 10:27
 */
public class Test01 {

    public static void main4(String[] args) {
        String str1 = "null";
        String str2 = "hello";
        System.out.println(str1.length());

    }

    public static void main3(String[] args) {
//        StringBuffer sb = new StringBuffer("hello");
//        System.out.println(sb.reverse());
//        StringBuffer sb = new StringBuffer("hello123");
//        System.out.println(sb.delete(5, 8));
        StringBuffer sb = new StringBuffer("hello");
        System.out.println(sb.insert(5, "world"));
    }

    public static void main2(String[] args) {
        String str = "hello";
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        String str2 = sb.toString();
        System.out.println(sb);
        System.out.println(str2);
    }

    public static void main1(String[] args) {
        StringBuffer sb = new StringBuffer();
        sb.append("hello").append("world");
        fun(sb);
        System.out.println(sb);
    }
    public static void fun(StringBuffer tmp) {
        tmp.append("www").append("abc").append("com");
    }
}
